
# core的默认参数配置
DEFAULT_SERVER_PORT = 5005

DEFAULT_SERVER_FORMAT = "{}://localhost:{}"

DEFAULT_SERVER_URL = DEFAULT_SERVER_FORMAT.format("http", DEFAULT_SERVER_PORT)

DEFAULT_NLU_FALLBACK_THRESHOLD = 0.0

DEFAULT_CORE_FALLBACK_THRESHOLD = 0.0

DEFAULT_FALLBACK_ACTION = "action_default_fallback"

DEFAULT_REQUEST_TIMEOUT = 60 * 5    # 5 minutes

DEFAULT_RESPONSE_TIMEOUT = 60 * 60  # 1 hour

DEFAULT_LOCK_LIFETIME = 60          # in seconds

REQUESTED_SLOT = "requested_slot"

# 知识库插槽
SLOT_LISTED_ITEMS = "knowledge_base_listed_objects"
SLOT_LAST_OBJECT = "knowledge_base_last_object"
SLOT_LAST_OBJECT_TYPE = "knowledge_base_last_object_type"
DEFAULT_KNOWLEDGE_BASE_ACTION = "action_query_knowledge_base"

# 特殊用户消息部分的开始
INTENT_MESSAGE_PREFIX = "/"
EXTERNAL_MESSAGE_PREFIX = "EXTERNAL: "

USER_INTENT_RESTART = "restart"

USER_INTENT_SESSION_START = "session_start"

USER_INTENT_BACK = "back"

USER_INTENT_OUT_OF_SCOPE = "out_of_scope"

ACTION_NAME_SENDER_ID_CONNECTOR_STR = "__sender_id:"

BEARER_TOKEN_PREFIX = "Bearer "

# 访问事件元数据中数据的键
# 它指定事件是否由外部实体（例如传感器）引起。
IS_EXTERNAL = "is_external"

# 机器学习策略打算使用的最低优先级
DEFAULT_POLICY_PRIORITY = 1

# 映射策略打算使用的优先级
MAPPING_POLICY_PRIORITY = 2

# 用于记忆策略的优先级
# 它比默认和映射的优先级更高，以优先训练故事
MEMOIZATION_POLICY_PRIORITY = 3

# 备用策略要使用的优先级
# 优先考虑回退策略比记忆策略更重要
FALLBACK_POLICY_PRIORITY = 4

# 表单策略要使用的优先级
# 将表单优先于其他策略是最高级别的
FORM_POLICY_PRIORITY = 5

# utter和respond的前缀
UTTER_PREFIX = "utter_"
RESPOND_PREFIX = "respond_"

DIALOGUE = "dialogue"
DEFAULT_CATEGORICAL_SLOT_VALUE = "__other__"

# RabbitMQ消息属性标头添加到使用`rasa export`发布的事件中
RASA_EXPORT_PROCESS_ID_HEADER_NAME = "rasa-export-process-id"

# 定义要访问的PostgreSQL模式的环境变量的名称。
# 有关更多详细信息，请参见https://www.postgresql.org/docs/9.1/ddl-schemas.html。
POSTGRESQL_SCHEMA = "POSTGRESQL_SCHEMA"

# 定义PostgreSQL池大小和最大溢出的环境变量名称
POSTGRESQL_POOL_SIZE = "SQL_POOL_SIZE"
POSTGRESQL_MAX_OVERFLOW = "SQL_MAX_OVERFLOW"
